import java.io.IOException;
import java.util.*;
public class PrintStream {

	private static Scanner sc;

	public static void main(String[] args) throws IOException {
		//print
		System.out.print(true);
		
		System.out.print('a');
		
		long l = 100;
		System.out.print(l);
		
		int i = 100;
		System.out.print(i);
		
		float f = 3.0f;
		System.out.print(f);
		
		double d = 4.0;
		System.out.print(d);
		
		char[] ch = {'H', 'e', 'l', 'l', 'o', '!'};
		System.out.print(ch);
		
		String str = "Hello World!";
		System.out.print(str);
		
		Object obj = str;
		System.out.print(obj);
		
		//println
		System.out.println(true);
		
		System.out.println('a');
		
		System.out.println(l);
		 
		System.out.println(i);
		
		System.out.println(f);

		System.out.println(d);

		System.out.println(ch);

		System.out.println(str);
		
		System.out.println(obj);
		
		//printf
		System.out.printf("%d %o %x %f3.2 %e %s", i, i, i, f, f,str);
		
		//System.in and Scanner
		System.out.println("输入字符");
		char a = (char)System.in.read();
		System.out.println(a);
		
		sc = new Scanner(System.in);
		
		System.out.println("输入整数");
		if(sc.hasNext()) System.out.println(sc.nextInt());
		System.out.println("输入双精度浮点数");
		if(sc.hasNext()) System.out.println(sc.nextDouble());
		System.out.println("输入单精度浮点数");
		if(sc.hasNext()) System.out.println(sc.nextFloat());
		System.out.println("输入字符串");
		if(sc.hasNext()) System.out.println(sc.next());
		
		System.in.close();
		//Cannot input anything
		if(sc.hasNext()) System.out.println(sc.next());
		
	}

}
